package com.cn.xly2023.mapper;

import com.cn.xly2023.pojo.User;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    User selectById(Integer id);

    List<User> selectAll();

    List<User> selectByPage(@Param("index") Integer index,
                            @Param("limit") Integer limit,
                            @Param("username")String username,
                            @Param("age")Integer age);

    int selectCount(@Param("username")String username,
                    @Param("age")Integer age);

    void deleteById(Integer id);

    void insert(@Param("user") User user);

    void updateById(@Param("id")Integer id,@Param("age") Integer age);

    User login(@Param("username") String username);
}
